package org.september.pisces.region.entity;

import java.math.BigDecimal;

import org.september.smartdao.anno.AutoIncrease;
import org.september.smartdao.anno.Entity;
import org.september.smartdao.anno.Id;
import org.september.smartdao.common.BaseEntity;

import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsAutoIncrement;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsKey;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * 区域
 **/
@Data
@Entity
@Table("pisces_region")
public class Region extends BaseEntity{

    /**
     *
     */
    @Id
    @AutoIncrease
    @IsKey
    @IsAutoIncrement
    @Column(name = "id", length = 20)
    private Long id;

    /**
     *
     */
    @NotEmpty(message = "区域名称不能为空")
    @Size(max = 64)
    @Column(name = "name", length = 64, isNull = false)
    private String name;

    @Column(name = "parent_id", isNull = false, comment = "上级部门id，根部门上级id为-1")
    private Long parentId;

    @Column(name = "zip_code")
    private Long zipCode;


    /**
     * 职能描述
     **/
    @Column(name = "remark", comment = "职能描述")
    private String remark;

    /**
     * 1省，2市，3区县
     */
    @Column(name = "type", type = MySqlTypeConstant.SMALLINT, length = 6, comment = " 1省，2市，3区县")
    private Integer type;

    @Column(name = "enable_flag", type = MySqlTypeConstant.SMALLINT, length = 6, comment = "是否启用 0否 1是")
    private Integer enableFlag;

    private transient BigDecimal value;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Long getZipCode() {
        return zipCode;
    }

    public void setZipCode(Long zipCode) {
        this.zipCode = zipCode;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getEnableFlag() {
        return enableFlag;
    }

    public void setEnableFlag(Integer enableFlag) {
        this.enableFlag = enableFlag;
    }

    public BigDecimal getValue() {
        return value;
    }

    public void setValue(BigDecimal value) {
        this.value = value;
    }
}
